<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>跳转提示</title>
	<link rel="stylesheet" type="text/css" href="__STATIC__/layui/css/layui.css">
	<style type="text/css">
		#jump { padding: 30px; line-height: 35px; background-color: #393D49; color: #fff; font-size: 18px; }
		#jump span { font-size: 14px; }
		#jump i { font-size: 18px; margin-right: 5px;  }
		#wait { margin: 0 10px; color: red; font-style: normal; font-weight: bold;}
	</style>
</head>
<body>
	<script src="__STATIC__/layui/layui.js" type="text/javascript"></script>
	<script>
		layui.use('layer', function(){
			var $ = layui.jquery;
			var layer = layui.layer;
			layer.open({
			    type: 1,
			    title: false,
			    closeBtn: false,
			    area: '500px;',
			    shade: 0,
			    id: 'LAY_JUMP',
			    resize: false,
			    btn: ['立即跳转', '返回首页'],
			    btnAlign: 'c',
			    moveType: 1,
			    content: '<div id="jump"><i class="layui-icon">&#xe645;</i><?php echo(strip_tags($msg));?><br><span>页面正在跳转，请稍等</span><i id="wait"><?php echo($wait);?></i><span>s</span></div>',
			    success: function (layero) {
			        var btn = layero.find('.layui-layer-btn');
			        btn.find('.layui-layer-btn0').attr({
			            href: '<?php echo($url);?>'
			        });
			    },
			    btn2: function(index, layero){
				    location.href = '/';
				}
			});

			var wait = document.getElementById('wait');
			var interval = setInterval(function() {
				var time = --wait.innerHTML;
				if (time <= 0) {
					location.href = '<?php echo($url);?>';
					clearInterval(interval);
				};
			}, 1000);
		});
	</script>
</body>
</html>